package com.niiwoo.activity.event.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description
 * @Author zq
 * @Date 2017/12/4
 */
@AllArgsConstructor
@Getter
public enum UserPrizeSendWayEventEnum {

    // 发送方式：0自动发送 1人工发送
    FROM_SYSTEM(Byte.valueOf("0"), "自动发送"),
    FROM_MANAGER(Byte.valueOf("1"), "人工发送");


    private final Byte code;
    private final String desc;

    public static UserPrizeSendWayEventEnum valueOf(Byte code) {
        for (UserPrizeSendWayEventEnum typeEventEnum : UserPrizeSendWayEventEnum.values()) {
            if (code.byteValue() == typeEventEnum.getCode()) {
                return typeEventEnum;
            }
        }
        return null;
    }
}
